<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>浮动元素与父盒子的关系</title>
    <style>
        .outer{
            width: 500px;
            height: 500px;
            border: 20px solid red;
            background-color: pink;
            padding: 20px;
        }

        .inner{
            float: right;
            width: 200px;
            height: 200px;
            background-color: blueviolet;
        }
    </style>
</head>
<body>
      
    <div class="outer">
            <div class="inner"></div>
    </div>
</body>
</html>